import request from "@/utils/request";
// import request from "@/utils/request-noauth";

// 登录方法
export function login(username, password, code, uuid) {
    const data = {
        username,
        password,
        code,
        uuid
    };
    return request({
        url: "/login",
        method: "post",
        data: data
    });
}
// 获取用户详细信息
export function getInfo() {
    // if (this.$store.user.state.token == "") {
    return request({
        url: "/getInfo",
        method: "get"
    });
    // }
}

// 退出方法
export function logout() {
    return request({
        url: "/logout",
        method: "post"
    });
}

// 获取验证码(图片)
export function getCodeImg() {
    return request({
        url: "/captchaImage",
        method: "get",
        params: data
    });
}
// 获取验证码
export function getCode(data) {
    return request({
        url: "/register/sendAliYunSms",
        method: "post",
        data: data
    });
}

// 手机号登录
// export function phoneSignIn(data) {
//   return request({
//     url: '/register/userPhoneLogin',
//     method: 'post',
//     data:data
//   })
// }

// 邮箱登录
export function emailSignIn(data) {
    return request({
        url: "/register/userPhoneLogin",
        method: "post",
        data: data
    });
}

// 密码重置
export function ForgetPsd(data) {
    return request({
        url: "register/missPwd",
        method: "post",
        data: data
    });
}
// 扫码绑定（微信）
export function wxBindUser(data) {
    return request({
        url: "/weixin/bindUser",
        method: "post",
        data: data
    });
}

// 电子协议
export function Agreements(data) {
    return request({
        url: " /biz/help/1",
        method: "get",
        params: data
    });
}
